Skip to content

Comments

Detect the presence of getauxval and elf_aux_info#1835

Merged
daviesrob merged 2 commits intosamtools:developfrom
brad0:getauxval_elf_aux_info
Sep 24, 2024
Merged

Detect the presence of getauxval and elf_aux_info#1835
daviesrob merged 2 commits intosamtools:developfrom
brad0:getauxval_elf_aux_info

Conversation

@brad0
Copy link
Contributor

@brad0 brad0 commented Sep 10, 2024

No description provided.

Add lines to the Makefile-generated config.h so HAVE_GETAUXVAL
or HAVE_ELF_AUX_INFO is set when appropriate.

Add lines to Makefile and simd.c to set HAVE_ELF_AUX_INFO
on a recent enough OpenBSD.  Part of this check needs to be
in simd.c because it pulls in sys/param.h, which defines
some macros (notable MIN and MAX) that don't get on with the
rest of HTSlib, and so need to be limited in scope.  This
can be simplified later once OpenBSD versions without
elf_aux_info() are no longer supported.
@daviesrob
Copy link
Member

I've added a commit which should ensure configure-less builds (which are supported by HTSlib for reasons of History) still enable the NEON code as before, resolving the issue raised in ths comment by @jmarshall.

I've tested this both with and without configure on arm64 Linux, FreeBSD, NetBSD, and OpenBSD (7.5 and 7.6). In all cases it works as expected (i.e. the NEON code is built, apart from on OpenBSD 7.5, which lacks the elf_aux_info() interface).

@brad0
Copy link
Contributor Author

brad0 commented Sep 24, 2024

@daviesrob Thanks. That looks reasonable.

@daviesrob daviesrob merged commit 5d8a186 into samtools:develop Sep 24, 2024
@brad0 brad0 deleted the getauxval_elf_aux_info branch September 24, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants